import ca.uhn.hl7v2.HL7Exception;
import com.hinacom.pix.client.PIXSource;
import com.hinacom.pix.entity.*;
import com.hinacom.pix.enums.ESex;
import org.junit.Test;

import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;

/**
 * Created by Administrator on 2017/1/15.
 */
public class T11415 {
    @Test
    public void t10() throws ParseException, HL7Exception, IOException {
        String assigningAuthorityPid = "1.2.156.10011.20170116.1022";

        Patient patient = new Patient();
        PatientIdentifier patientIdentifier = new PatientIdentifier();
        patientIdentifier.setId(assigningAuthorityPid);
        AssigningAuthority assigningAuthority = AssigningAuthority.createInstanceWithDefualtDomain();

        patientIdentifier.setAssigningAuthority(assigningAuthority);
        patient.setInternalIdentifier(patientIdentifier);
        PatientName patientName = new PatientName();
        patientName.setLastName("DelayedDoc");
        patientName.setFirstName("PACS_Hinacom");
        patient.setPatientName(patientName);

        PIXSource pixSource = new PIXSource();
        pixSource.registerInPatient(patient);
    }
}
